package com.yueqian.framework.annotation.validation;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = EnumValidator.class) // 标明由哪个类执行校验逻辑
public @interface Enum {
	String message() default "枚举数据不能为空";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};

	int[] value();
}
